\doxysection{arm\+\_\+math\+\_\+memory.\+h}
\hypertarget{arm__math__memory_8h_source}{}\label{arm__math__memory_8h_source}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Middlewares/ST/ARM/DSP/Include/arm\_math\_memory.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Middlewares/ST/ARM/DSP/Include/arm\_math\_memory.h}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/******************************************************************************}}
\DoxyCodeLine{00002\ \textcolor{comment}{\ *\ @file\ \ \ \ \ arm\_math\_memory.h}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ @brief\ \ \ \ Public\ header\ file\ for\ CMSIS\ DSP\ Library}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ @version\ \ V1.10.0}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ @date\ \ \ \ \ 08\ July\ 2021}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ Target\ Processor:\ Cortex-\/M\ and\ Cortex-\/A\ cores}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ ******************************************************************************/}}
\DoxyCodeLine{00008\ \textcolor{comment}{/*}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ Copyright\ (c)\ 2010-\/2021\ Arm\ Limited\ or\ its\ affiliates.\ All\ rights\ reserved.}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ SPDX-\/License-\/Identifier:\ Apache-\/2.0}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ License);\ you\ may}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ www.apache.org/licenses/LICENSE-\/2.0}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ AS\ IS\ BASIS,\ WITHOUT}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ limitations\ under\ the\ License.}}
\DoxyCodeLine{00024\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00025\ }
\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#ifndef\ \_ARM\_MATH\_MEMORY\_H\_}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \textcolor{preprocessor}{\#define\ \_ARM\_MATH\_MEMORY\_H\_}}
\DoxyCodeLine{00029\ }
\DoxyCodeLine{00030\ \textcolor{preprocessor}{\#include\ "{}arm\_math\_types.h"{}}}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \textcolor{preprocessor}{\#ifdef\ \ \ \_\_cplusplus}}
\DoxyCodeLine{00034\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}}
\DoxyCodeLine{00035\ \{}
\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#if\ \ \ defined\ (\ \_\_CC\_ARM\ )}}
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\ \ \#define\ \_\_SIMD32\_TYPE\ int32\_t\ \_\_packed}}
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#elif\ defined\ (\ \_\_ARMCC\_VERSION\ )\ \&\&\ (\ \_\_ARMCC\_VERSION\ >=\ 6010050\ )}}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\ \ \#define\ \_\_SIMD32\_TYPE\ int32\_t}}
\DoxyCodeLine{00046\ \textcolor{preprocessor}{\#elif\ defined\ (\ \_\_GNUC\_\_\ )}}
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\ \ \#define\ \_\_SIMD32\_TYPE\ int32\_t}}
\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#elif\ defined\ (\ \_\_ICCARM\_\_\ )}}
\DoxyCodeLine{00049\ \textcolor{preprocessor}{\ \ \#define\ \_\_SIMD32\_TYPE\ int32\_t\ \_\_packed}}
\DoxyCodeLine{00050\ \textcolor{preprocessor}{\#elif\ defined\ (\ \_\_TI\_ARM\_\_\ )}}
\DoxyCodeLine{00051\ \textcolor{preprocessor}{\ \ \#define\ \_\_SIMD32\_TYPE\ int32\_t}}
\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#elif\ defined\ (\ \_\_CSMC\_\_\ )}}
\DoxyCodeLine{00053\ \textcolor{preprocessor}{\ \ \#define\ \_\_SIMD32\_TYPE\ int32\_t}}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#elif\ defined\ (\ \_\_TASKING\_\_\ )}}
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\ \ \#define\ \_\_SIMD32\_TYPE\ \_\_un(aligned)\ int32\_t}}
\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#elif\ defined(\_MSC\_VER\ )}}
\DoxyCodeLine{00057\ \textcolor{preprocessor}{\ \ \#define\ \_\_SIMD32\_TYPE\ int32\_t}}
\DoxyCodeLine{00058\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00059\ \textcolor{preprocessor}{\ \ \#error\ Unknown\ compiler}}
\DoxyCodeLine{00060\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{preprocessor}{\#define\ \_\_SIMD32(addr)\ \ \ \ \ \ \ \ (*(\_\_SIMD32\_TYPE\ **)\ \&\ (addr))}}
\DoxyCodeLine{00063\ \textcolor{preprocessor}{\#define\ \_\_SIMD32\_CONST(addr)\ \ (\ (\_\_SIMD32\_TYPE\ *\ )\ \ \ (addr))}}
\DoxyCodeLine{00064\ \textcolor{preprocessor}{\#define\ \_SIMD32\_OFFSET(addr)\ \ (*(\_\_SIMD32\_TYPE\ *\ )\ \ \ (addr))}}
\DoxyCodeLine{00065\ \textcolor{preprocessor}{\#define\ \_\_SIMD64(addr)\ \ \ \ \ \ \ \ (*(\ \ \ \ \ \ int64\_t\ **)\ \&\ (addr))}}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00068\ \textcolor{comment}{/*\ SIMD\ replacement\ */}}
\DoxyCodeLine{00069\ }
\DoxyCodeLine{00070\ }
\DoxyCodeLine{00076\ \_\_STATIC\_FORCEINLINE\ q31\_t\ read\_q15x2\ (}
\DoxyCodeLine{00077\ \ \ q15\_t\ \textcolor{keyword}{const}\ *\ pQ15)}
\DoxyCodeLine{00078\ \{}
\DoxyCodeLine{00079\ \ \ q31\_t\ val;}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \textcolor{preprocessor}{\#ifdef\ \_\_ARM\_FEATURE\_UNALIGNED}}
\DoxyCodeLine{00082\ \ \ memcpy\ (\&val,\ pQ15,\ 4);}
\DoxyCodeLine{00083\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00084\ \ \ val\ =\ (pQ15[1]\ <<\ 16)\ |\ (pQ15[0]\ \&\ 0x0FFFF)\ ;}
\DoxyCodeLine{00085\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00086\ }
\DoxyCodeLine{00087\ \ \ \textcolor{keywordflow}{return}\ (val);}
\DoxyCodeLine{00088\ \}}
\DoxyCodeLine{00089\ }
\DoxyCodeLine{00095\ \textcolor{preprocessor}{\#define\ read\_q15x2\_ia(pQ15)\ read\_q15x2((*(pQ15)\ +=\ 2)\ -\/\ 2)}}
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00102\ \textcolor{preprocessor}{\#define\ read\_q15x2\_da(pQ15)\ read\_q15x2((*(pQ15)\ -\/=\ 2)\ +\ 2)}}
\DoxyCodeLine{00103\ }
\DoxyCodeLine{00110\ \_\_STATIC\_FORCEINLINE\ \textcolor{keywordtype}{void}\ write\_q15x2\_ia\ (}
\DoxyCodeLine{00111\ \ \ q15\_t\ **\ pQ15,}
\DoxyCodeLine{00112\ \ \ q31\_t\ \ \ \ value)}
\DoxyCodeLine{00113\ \{}
\DoxyCodeLine{00114\ \ \ q31\_t\ val\ =\ value;}
\DoxyCodeLine{00115\ \textcolor{preprocessor}{\#ifdef\ \_\_ARM\_FEATURE\_UNALIGNED}}
\DoxyCodeLine{00116\ \ \ memcpy\ (*pQ15,\ \&val,\ 4);}
\DoxyCodeLine{00117\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00118\ \ \ (*pQ15)[0]\ =\ (q15\_t)(val\ \&\ 0x0FFFF);}
\DoxyCodeLine{00119\ \ \ (*pQ15)[1]\ =\ (q15\_t)((val\ >>\ 16)\ \&\ 0x0FFFF);}
\DoxyCodeLine{00120\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00121\ }
\DoxyCodeLine{00122\ \ *pQ15\ +=\ 2;}
\DoxyCodeLine{00123\ \}}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00131\ \_\_STATIC\_FORCEINLINE\ \textcolor{keywordtype}{void}\ write\_q15x2\ (}
\DoxyCodeLine{00132\ \ \ q15\_t\ *\ pQ15,}
\DoxyCodeLine{00133\ \ \ q31\_t\ \ \ value)}
\DoxyCodeLine{00134\ \{}
\DoxyCodeLine{00135\ \ \ q31\_t\ val\ =\ value;}
\DoxyCodeLine{00136\ }
\DoxyCodeLine{00137\ \textcolor{preprocessor}{\#ifdef\ \_\_ARM\_FEATURE\_UNALIGNED}}
\DoxyCodeLine{00138\ \ \ memcpy\ (pQ15,\ \&val,\ 4);}
\DoxyCodeLine{00139\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00140\ \ \ pQ15[0]\ =\ (q15\_t)(val\ \&\ 0x0FFFF);}
\DoxyCodeLine{00141\ \ \ pQ15[1]\ =\ (q15\_t)(val\ >>\ 16);}
\DoxyCodeLine{00142\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00143\ \}}
\DoxyCodeLine{00144\ }
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00151\ \_\_STATIC\_FORCEINLINE\ q31\_t\ read\_q7x4\ (}
\DoxyCodeLine{00152\ \ \ q7\_t\ \textcolor{keyword}{const}\ *\ pQ7)}
\DoxyCodeLine{00153\ \{}
\DoxyCodeLine{00154\ \ \ q31\_t\ val;}
\DoxyCodeLine{00155\ }
\DoxyCodeLine{00156\ \textcolor{preprocessor}{\#ifdef\ \_\_ARM\_FEATURE\_UNALIGNED}}
\DoxyCodeLine{00157\ \ \ memcpy\ (\&val,\ pQ7,\ 4);}
\DoxyCodeLine{00158\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00159\ \ \ val\ =((pQ7[3]\ \&\ 0x0FF)\ <<\ 24)\ \ |\ ((pQ7[2]\ \&\ 0x0FF)\ <<\ 16)\ \ |\ ((pQ7[1]\ \&\ 0x0FF)\ <<\ 8)\ \ |\ (pQ7[0]\ \&\ 0x0FF);}
\DoxyCodeLine{00160\ \textcolor{preprocessor}{\#endif\ }}
\DoxyCodeLine{00161\ \ \ \textcolor{keywordflow}{return}\ (val);}
\DoxyCodeLine{00162\ \}}
\DoxyCodeLine{00163\ }
\DoxyCodeLine{00169\ \textcolor{preprocessor}{\#define\ read\_q7x4\_ia(pQ7)\ read\_q7x4((*(pQ7)\ +=\ 4)\ -\/\ 4)}}
\DoxyCodeLine{00170\ }
\DoxyCodeLine{00176\ \textcolor{preprocessor}{\#define\ read\_q7x4\_da(pQ7)\ read\_q7x4((*(pQ7)\ -\/=\ 4)\ +\ 4)}}
\DoxyCodeLine{00177\ }
\DoxyCodeLine{00184\ \_\_STATIC\_FORCEINLINE\ \textcolor{keywordtype}{void}\ write\_q7x4\_ia\ (}
\DoxyCodeLine{00185\ \ \ q7\_t\ **\ pQ7,}
\DoxyCodeLine{00186\ \ \ q31\_t\ \ \ value)}
\DoxyCodeLine{00187\ \{}
\DoxyCodeLine{00188\ \ \ q31\_t\ val\ =\ value;}
\DoxyCodeLine{00189\ \textcolor{preprocessor}{\#ifdef\ \_\_ARM\_FEATURE\_UNALIGNED}}
\DoxyCodeLine{00190\ \ \ memcpy\ (*pQ7,\ \&val,\ 4);}
\DoxyCodeLine{00191\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00192\ \ \ (*pQ7)[0]\ =\ (q7\_t)(val\ \&\ 0x0FF);}
\DoxyCodeLine{00193\ \ \ (*pQ7)[1]\ =\ (q7\_t)((val\ >>\ 8)\ \&\ 0x0FF);}
\DoxyCodeLine{00194\ \ \ (*pQ7)[2]\ =\ (q7\_t)((val\ >>\ 16)\ \&\ 0x0FF);}
\DoxyCodeLine{00195\ \ \ (*pQ7)[3]\ =\ (q7\_t)((val\ >>\ 24)\ \&\ 0x0FF);}
\DoxyCodeLine{00196\ }
\DoxyCodeLine{00197\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00198\ \ \ *pQ7\ +=\ 4;}
\DoxyCodeLine{00199\ \}}
\DoxyCodeLine{00200\ }
\DoxyCodeLine{00201\ }
\DoxyCodeLine{00202\ \textcolor{preprocessor}{\#ifdef\ \ \ \_\_cplusplus}}
\DoxyCodeLine{00203\ \}}
\DoxyCodeLine{00204\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00205\ }
\DoxyCodeLine{00206\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*ifndef\ \_ARM\_MATH\_MEMORY\_H\_\ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
